package service.impl;

import dao.UserDao;
import dao.impl.UserDaoimpl;
import pojo.User;
import service.UserService;

import java.util.List;

public class UserServiceimpl implements UserService {
    UserDao userDao=new UserDaoimpl();


    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }
    @Override
    public int addUser(User user) {
        return userDao.addUser(user);
    }
    @Override
    public User findById(Integer id) {
        return userDao.findById(id);
    }

    @Override
    public int updateUser(User user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUserById(Integer id) {
        return userDao.deleteUserById(id);
    }

}
